function CheckBMI()
	{
	if (document.orderForm.Weight.value != '' && document.orderForm.Height.value != '')
		{
		CalculateBMI(0);
		}
	else
		{
		document.orderForm.dBMI.value = '';
		document.orderForm.BMI.value = '';
		}
	}
/////////////////////////////////////////////////////////////////
function CalculateBMI(val)
	{
	flagBMI = val;
	if (flagBMI == 1)
		{
		if(document.orderForm.Height.selectedIndex==0 || document.orderForm.Height.selectedIndex==1)
			{
			alert ('Please enter your Height.');
			document.orderForm.Height.focus();
			return false;
			}
		else if (isNaN(document.orderForm.Weight.value) || eval(document.orderForm.Weight.value)==0)
			{
			alert ('Please enter your Weight.');
			document.orderForm.Weight.focus();
			return false;
			}
		}
	if (isNaN(document.orderForm.Weight.value) || eval(document.orderForm.Weight.value)==0 || document.orderForm.Height.selectedIndex==0)
		{
		document.orderForm.dBMI.value = '';
		document.orderForm.BMI.value = '';
		}
	else
		{
		var Height = eval(document.orderForm.Height.options[document.orderForm.Height.selectedIndex].value)/39.36;
		var Weight = eval(document.orderForm.Weight.value)/2.2;
		document.orderForm.dBMI.value = Math.round(Weight/(Height*Height));
		document.orderForm.BMI.value = document.orderForm.dBMI.value;
		}
	if (flagBMI == 1)
		{
		if (eval(document.orderForm.BMI.value) < 25 || eval(document.orderForm.BMI.value) > 40)
			{
			alert ('BMI not within acceptable range.');
			document.orderForm.Height.focus();
			return false;
			}
		}
	return true;
	}
